<%@page contentType="text/html; charset=UTF-8"  language="java"%>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>多个脚本段的互相访问</title>
</head>
<body>
     <%!
         int i;
     %>
     <%
         for(int i = 0; i <= 10; i++ ){
     %>
          <h1>你好！张先生</h1>
     <%
         }
     %>
    <%
        int sum = 0;
        for (int j = 0; j <= 0; j++){
            sum += j;
        }
        out.println("<h1>sum="+sum+"</h1>");
    %>
</body>
</html>